<template>
  <div class="app-container">
    

    

    <el-table border v-loading="loading" :data="menusList">
      <!-- <el-table-column type="selection" width="55" align="center" /> -->
      <el-table-column label="序号" align="center" type="index" width="50" />

      <el-table-column label="订单号" align="center" prop="doseId">
      </el-table-column>
      <el-table-column label="学校" align="center" prop="schoolName">
      </el-table-column>
      <el-table-column label="商品" align="center" prop="typeName">
      </el-table-column>
      <el-table-column label="规格" align="center" prop="specName">
      </el-table-column>
      <el-table-column label="单位" align="center" prop="brandName">
      </el-table-column>
      <el-table-column label="数量" align="center" prop="num">
      </el-table-column>

      <el-table-column
        label="创建时间"
        align="center"
        prop="createTime"
        width="180"
      >
      </el-table-column>
      
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- 添加或修改菜谱对话框 -->
  </div>
</template>
        
  <script>
import { getQuantifyOrder, getDoseInfoManage } from "@/api/system/quantify";
//   import record from "./record";

export default {
  // components: { record },
  props: {
    cid: {
      type: Number,
      default: 0,
    },
  },
  name: "orderInfo",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 菜谱表格数据
      menusList: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        computeId: 0,
      },
    };
  },
  created() {
    // console.log(this.$route.params) cid
    this.queryParams.computeId = this.cid;
    this.getList();

    // this.show();
    //   import { getFormatbrandData } from "@/api/system/brand";
    //   import { getFormatCateData } from "@/api/system/cate";
    //   import { getFormatSpecData } from "@/api/system/specifications";
  },
  methods: {
    /** 查询菜谱列表 */
    getList() {
      this.loading = true;
      getQuantifyOrder(this.queryParams).then((response) => {
        console.log(response);
        this.menusList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        brandId: undefined, //单位id
        cateId: this.queryParams.cateId, //行业菜谱id
        demand: undefined, //要求
        name: undefined, //名称
        other: undefined, //其他
        packages: undefined, //包装
        parentId: -1, //上级分类id
        specId: undefined, //规格id
        id: undefined,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    seeInfo(row) {
      console.log(row);
      this.open = true;
      this.title = row.schoolName;
      this.orderId = row.id;
      // getDoseInfoManage({ id: row.id }).then((response) => {
      //   console.log(response);
      // });
    },
  },
};
</script>
        